<template>
    <elm-page-tb>
        <template #top>
          <el-input placeholder="标题" prefix-icon='el-icon-search' size="mini" style="width: 250px;margin: 0 10px"
                    v-model="postData.title" clearable></el-input>
          <el-input placeholder="作者" prefix-icon='el-icon-search' size="mini" style="width: 250px;margin: 0 10px"
                    v-model="postData.author" clearable></el-input>
            <right>
                <el-button-group>
                    <el-button icon="el-icon-search" size="mini" @click="tablebinding()">查询</el-button>
                    <elm-open-button url="notice_edit" icon="el-icon-edit" title="新增"  width="90%" height="90%">新增</elm-open-button>
                </el-button-group>
            </right>
        </template>
        <elm-table url="/business/cms/notice/GetData" :post-data="postData" :show-index="true">
            <el-table-column prop="title" label="标题" header-align="center"></el-table-column>
            <el-table-column prop="author" label="作者" header-align="center"></el-table-column>
            <el-table-column prop="views" label="浏览人数" header-align="center"></el-table-column>
            <el-table-column prop="publish_time" label="发布时间" header-align="center">
              <template v-slot="scope">
                {{ elm.parseTime(scope.row.publish_time) }}
              </template>
            </el-table-column>
            <el-table-column fixed="right" label="操作" width="180px" align="center">
                <template v-slot="scope">
                    <elm-open-button url="notice_edit" title="编辑"  width="90%" height="90%" :data="{ model: scope.row }" type="text">编辑</elm-open-button>
                    <elm-delete-button type="text" size="mini" url="/business/cms/notice/Delete" :data="{ id: scope.row.id }">删除</elm-delete-button>
                </template>
            </el-table-column>
        </elm-table>
    </elm-page-tb>
</template>

<script>
export default {
    extends: elmVueBase,
    data() {
        return {
            postData: { title: null }
        }
    },
    async created() {
    },
    methods: {
    }
}
</script>

